home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / RCS / oldlibrary.mk,v < prev    next >
Encoding:
Text File  |  1988-09-23  |  4.1 KB  |  179 lines

  1. head     1.2;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @@;
  6.  
  7.  
  8. 1.2
  9. date     88.09.23.13.23.57;  author brent;  state Exp;
  10. branches ;
  11. next     1.1;
  12.  
  13. 1.1
  14. date     88.08.26.17.13.55;  author brent;  state Exp;
  15. branches ;
  16. next     ;
  17.  
  18.  
  19. desc
  20. @pmake library for old c library
  21. @
  22.  
  23.  
  24. 1.2
  25. log
  26. @Fixed include path.
  27. @
  28. text
  29. @#
  30. # Included makefile for creating a single library
  31. #
  32. # $Header: library.mk,v 1.4 88/06/16 10:15:35 douglis Exp $ SPRITE (Berkeley)
  33. #
  34. # Expected variables:
  35. #    LIBRARY        base name of library (e.g. tcl, sx, c, etc.)
  36. #    INSTALLDIR    place to install archive
  37. #    LINTDIR        place to install lint library
  38. #    INCLUDEDIR    place to install public header files
  39. #    SRCS        all sources for library
  40. #    HDRS        all header files (public and private)
  41. #    PUBHDRS        all public header files.
  42. #
  43.  
  44. #
  45. # Define search paths for include files
  46. #
  47. .PATH.h        : # Clear out previous
  48. .PATH.h        : /sprite/lib/include /sprite/att/lib/include \
  49.                   /sprite/lib/include/kernel /sprite/lib/include/sun2.md
  50.  
  51. #
  52. # System programs -- assign conditionally so they may be redefined in
  53. # including makefile
  54. #
  55. BINDIR        = /sprite/cmds
  56. KERNELLINTDIR    = /sprite/src/kernel/Lint
  57.  
  58. AS        ?= $(BINDIR)/as
  59. CC        ?= $(BINDIR)/cc
  60. CP        ?= $(BINDIR)/cp
  61. CTAGS        ?= $(BINDIR)/ctags
  62. ECHO        ?= $(BINDIR)/echo
  63. INSTALL        ?= $(BINDIR)/install
  64. LINT        ?= $(BINDIR)/lint
  65. MV        ?= $(BINDIR)/mv
  66. RM        ?= $(BINDIR)/rm
  67. CHOWN        ?= $(BINDIR)/chown
  68. CHGRP        ?= $(BINDIR)/chgrp
  69. CHMOD        ?= $(BINDIR)/chmod
  70.  
  71. #
  72. # Flags everyone should have. CCFLAGS, CAFLAGS and CLINTFLAGS are provided
  73. # for the user to add flags for CC, AS or LINT from the command line.
  74. #
  75. CCFLAGS        ?=
  76. CAFLAGS        ?=
  77. CLINTFLAGS    ?=
  78. CFLAGS        += -g -m68010 $(CCFLAGS) $(.INCLUDES)
  79. AFLAGS        += -m68010 $(CAFLAGS)
  80. LINTFLAGS    += $(CLINTFLAGS)
  81.  
  82. INSTALLFLAGS    ?=
  83.  
  84. .MAKEFLAGS    : -C
  85.  
  86. #
  87. # Include the various system makefiles we need --
  88. #    po.mk for creating profiled objects
  89. #    makelib.mk for creating archived libraries
  90. #    makelint.mk for creating lint libraries
  91. #
  92. many_libraries    = True
  93. #include    <po.mk>
  94. #include    <makelib.mk>
  95. #include    <makelint.mk>
  96.  
  97. #
  98. # Define the various types of libraries we can make to make our rules and
  99. # maybe the user's easier to write.
  100. #
  101. REGLIB        = lib$(LIBRARY).a
  102. PROFLIB        = lib$(LIBRARY)_p.a
  103. LINTLIB        = llib-l$(LIBRARY).ln
  104.  
  105. #
  106. # Installation macro. Archived libraries go in INSTALLDIR, lint libraries
  107. # go in LINTDIR, header files go in INCLUDEDIR
  108. #
  109. # INSTALLLIB may be used to install libraries only
  110. # INSTALLLINT will install only lint libraries
  111. # INSTALLHDRS will install header files only.
  112. # MAKEINSTALL will do all of them in a single rule.
  113. #
  114. # In this version, the 'install' target uses the MAKEINSTALL rule,
  115. # so it depends on all the archives, lint libraries and header files for
  116. # the library. 'instlib' will install the library, 'instlint' will install
  117. # the lint library and 'installhdrs' will install the public header files
  118. #
  119. INSTALLLIB    : .USE
  120.     if [ ! -z "$(.ALLSRC:Mlib*.a)" ]; then
  121.         $(INSTALL) -c -m 664 -o root -g wheel $(INSTALLFLAGS) \
  122.             $(.ALLSRC:Mlib*.a) $(INSTALLDIR)
  123.         for i in $(.ALLSRC:Mlib*.a); do
  124.             ranlib $(INSTALLDIR)/$i
  125.         done
  126.     fi
  127. INSTALLLINT    : .USE
  128.     if [ ! -z "$(.ALLSRC:Mllib*.ln)" ]; then
  129.         $(INSTALL) -c -m 444 -o root -g wheel $(INSTALLFLAGS) \
  130.             $(.ALLSRC:Mllib*.ln) $(LINTDIR)
  131.     fi
  132. INSTALLHDR    : .USE
  133.     if [ ! -z "$(.ALLSRC:M*.h)" ]; then
  134.         $(INSTALL) -c -m 444 -o root -g wheel $(INSTALLFLAGS) \
  135.             $(.ALLSRC:M*.h) $(INCLUDEDIR)
  136.     fi
  137. MAKEINSTALL    : INSTALLLIB INSTALLLINT INSTALLHDR .USE
  138.  
  139. #
  140. # Define the targets, if the user wants us to
  141. #
  142. #ifdef define_targets
  143. $(REGLIB)    : $(REGLIB)($(OBJS)) MAKELIB
  144. $(PROFLIB)    : $(PROFLIB)($(OBJS:S/.o$/.po/g)) MAKELIB
  145. $(LINTLIB)    : $(SRCS:M*.c) $(HDRS) MAKELINT
  146.  
  147. library        : $(REGLIB)
  148. profile        : $(PROFLIB)
  149. lint        : $(LINTLIB)
  150.  
  151. install        :: $(REGLIB) $(LINTLIB) $(PUBHDRS) MAKEINSTALL
  152. instlib        :: $(REGLIB) INSTALLIB
  153. instlint    :: $(LINTLIB) INSTALLLINT
  154. installhdrs    : $(PUBHDRS) INSTALLHDR
  155.  
  156. #endif define_targets
  157.  
  158. CLEANOBJS    ?=
  159. clean        :: .NOTMAIN
  160.     $(RM) -f $(CLEANOBJS) y.tab.c lex.yy.c core a.out *~
  161.  
  162. mkmf makemake    :: .NOTMAIN    # Does nothing. Says nothing
  163.  
  164. DEPFILE        ?= $(MAKEFILE)
  165. #include    <makedepend.mk>
  166. #include     <rdist.mk>
  167. @
  168.  
  169.  
  170. 1.1
  171. log
  172. @Initial revision
  173. @
  174. text
  175. @d21 1
  176. a21 1
  177.                   /sprite/lib/include/kernel /sprite/lib/include/kernel/sun2.md
  178. @
  179.